預約管理API
獲取預約列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| booking_id | String | Body | 預約ID |
| amenity_id | String | Body | 設施ID |
| amenity_name | String | Body | 設施名稱 |
| amenity_picture_url | String | Body | 設施圖片地址 |
| amenity_description | String | Body | 設施描述 |
| building_name | String | Body | 樓棟名稱 |
| family_name | String | Body | 家庭名稱 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| state | String | Body | 狀態 pending:待審覈 rejected:已拒絕 canceled:已取消 success:成功 |
| is_expired | Boolean | Body | 判斷預約是否過期 true:已過期 false:未過期 |
| pin_code | String | Body | PIN碼 |
| qr_code_url | String | Body | 二維碼地址 |
| created_time | String | Body | 創建時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"booking_id": "bfa332e258aae1badbb27d31128f442d1",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
]
}
失敗返回示例
見 接口失敗返回
獲取預約信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_id | String | Body | 是 | 預約ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| amenity_id | String | Body | 設施ID |
| amenity_name | String | Body | 設施名稱 |
| amenity_picture_url | String | Body | 設施圖片地址 |
| amenity_description | String | Body | 設施描述 |
| building_name | String | Body | 樓棟名稱 |
| family_name | String | Body | 家庭名稱 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| state | String | Body | 狀態 pending:待審覈 rejected:已拒絕 canceled:已取消 success:成功 |
| is_expired | Boolean | Body | 判斷預約是否過期 true:已過期 false:未過期 |
| pin_code | String | Body | PIN碼 |
| qr_code_url | String | Body | 二維碼地址 |
| created_time | String | Body | 創建時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
}
失敗返回示例
見 接口失敗返回
獲取可預約設施列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| amenity_id | String | Body | 設施ID |
| amenity_name | String | Body | 設施名稱 |
| amenity_picture_url | String | Body | 設施圖片地址 |
| amenity_description | String | Body | 設施描述 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_amenity_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_description": "test",
"amenity_picture_url": "https://test.akubela.com/g"
}
]
}
失敗返回示例
見 接口失敗返回
獲取可預約時間列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| date | String | Body | 是 | 日期 |
| amenity_id | String | Body | 是 | 設施ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| allowed_booking_time | Object<booking_time> | Body | 允許預約的時間 |
| disallowed_booking_time | []Object<booking_time> | Body | 不允許預約的時間 |
booking_time說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_booking_time_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"date": "2024-01-02"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"allowed_booking_time": {
"start_time": "08:00",
"finish_time": "23:00"
},
"disallowed_booking_time": [
{
"start_time": "08:30",
"finish_time": "11:30"
},
{
"start_time": "21:30",
"finish_time": "23:00"
}
]
}
}
失敗返回示例
見 接口失敗返回
創建預約信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| amenity_id | String | Body | 是 | 設施ID |
| start_time | String | Body | 是 | 開始時間,UTC |
| duration | Integer | Body | 是 | 預約時長,單位:分鐘 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"start_time": "2024-01-02 13:14:15",
"duration": 80
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失敗返回示例
見 接口失敗返回
創建掃碼預約信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_code | String | Body | 是 | 預約碼 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_code_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_code": "bfa332e258aae1badbb27d31128f442dc"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失敗返回示例
見 接口失敗返回
刪除預約信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| booking_id | String | Body | 是 | 預約ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除預約信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| bookings | []Object<booking> | Body | 是 | 預約信息 |
booking說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| booking_id | String | Body | 是 | 預約ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"bookings": [
{
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回